home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il_c / ilHistScaleImg.z / ilHistScaleImg
Encoding:
Text File  |  2002-10-03  |  17.1 KB  |  331 lines

  1.  
  2.  
  3.  
  4. iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg - performs histogram scaling of image
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilLink : ilImage : ilCacheImg : ilMemCacheImg : ilOpImg : ilMonadicImg :
  13.      ilScaleImg
  14.  
  15. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  16.      #include <il/ilCdefs.h>
  17.  
  18. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      This class is publicly derived from ilScaleImg and performs the operation
  20.      of histogram scaling. A specified percentage of high intensity pixels are
  21.      clamped to a specified maximum output level. Similiarly a specified
  22.      percentage of low intensity pixels are clamped to a specified minimum
  23.      output level.  The intervening intensities are linearly scaled between
  24.      the two specified output levels. Histogram scaling is an operation
  25.      through which one can enhance the contrast of an image.
  26.  
  27.      The thresholds beyond which clamping occurs are computed from the
  28.      specified clip percentages using the histogram. In most cases, this
  29.      results in different thresholds for different channels. In order to scale
  30.      all channels uniformly, the smallest lower threshold is used as the lower
  31.      threshold for all channels and the largest higher threshold is used as
  32.      the higher threshold for all channels. As a result the clip percentages
  33.      for each channel in the output image might differ from that specified.
  34.  
  35.      This operation involves computing the histogram of the source image.
  36.      This can be computed within a region of interest, if one is specified.
  37.      Along with the region of interest, one needs to specify the _x and _y
  38.      offsets into the source image, at which the region of interest is to be
  39.      placed. If a region of interest is not specified, then the histogram of
  40.      the entire image is used. If this histogram is already computed, then a
  41.      pointer to it can be passed, thus speeding up the whole operation. The
  42.      same thresholds and output levels are used for all channels.
  43.  
  44.      Images of any data type can be given as input. See the man page for
  45.      ilScaleImg to see how the data type and the allowable intensity range for
  46.      this operator might be changed by cccchhhheeeecccckkkkMMMMiiiinnnnMMMMaaaaxxxx(((()))).
  47.  
  48. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  49.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  50.  
  51.           ilHistScaleImg *ilHistScaleImgCreate(ilImage *src, double lowClip,
  52.                                                double highClip, double outMin,
  53.                                                double outMax, ilImgStat *imgstat,
  54.                                                ilRoi *roi, int roiXoffset,
  55.                                                int roiYoffset)
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))
  71.  
  72.  
  73.  
  74.      SSSSeeeetttt hhhhiiiissssttttooooggggrrrraaaammmm ppppaaaarrrraaaammmmeeeetttteeeerrrrssss
  75.  
  76.           ilImgStat*  ilHistScaleImgGetImgStat(ilHistScaleImg *obj)
  77.           void ilHistScaleImgSetImgStat(ilHistScaleImg *img, ilImgStat *imgstat)
  78.           ilRoi*  ilHistScaleImgGetRoi(ilHistScaleImg *obj)
  79.           void ilHistScaleImgSetRoi(ilHistScaleImg *img, ilRoi *roi
  80.                                     int roiXoffset, int roiYoffset)
  81.           void ilHistScaleImgSetClip(ilHistScaleImg *img, double lowClip,
  82.                                      double highClip)
  83.           void ilHistScaleImgSetHistLimits(ilHistScaleImg *img, double low,
  84.                                            double high)
  85.  
  86.  
  87. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  88.      iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg(((())))
  89.  
  90.           ilHistScaleImg *ilHistScaleImgCreate(ilImage *src, double lowClip,
  91.                                                double highClip, double outMin,
  92.                                                double outMax, ilImgStat *imgstat,
  93.                                                ilRoi *roi, int roiXoffset,
  94.                                                int roiYoffset))
  95.  
  96.  
  97.           This is the constructor and it takes: a pointer, _s_r_c, to the input
  98.           image; _l_o_w_C_l_i_p and _h_i_g_h_C_l_i_p, that specify the high and low clip
  99.           percentages; _o_u_t_M_i_n and _o_u_t_M_a_x, that specify the desired minimum and
  100.           maximum output levels.
  101.  
  102.           An optional pointer to an ilImgStat ,_i_m_g_s_t_a_t, can also be specified.
  103.           _i_m_g_s_t_a_t is a means of providing the histogram of the input image and
  104.           can be specified if the histogram has already been computed or
  105.           instantiated. If the value of NULL is used, then the histogram is
  106.           computed by this operator.
  107.  
  108.           If desired, a region of interest can be specified through the
  109.           pointer _r_o_i. _r_o_i_X_o_f_f_s_e_t, _r_o_i_Y_o_f_f_s_e_t are the _x and _y offsets into
  110.           _s_r_c, at which _r_o_i is to be placed. These offsets are specified in
  111.           the same coordinate space as that of _s_r_c. The histogram of _s_r_c is
  112.           then computed only within the region pointed to by _r_o_i.  If the
  113.           value of NULL is used, then the region of interest is assumed to be
  114.           the entire image.
  115.  
  116.      sssseeeettttCCCClllliiiipppp(((())))
  117.  
  118.           void ilHistScaleImgSetHclip(ilHistScaleImg *img, double lowClip,
  119.                                       double highClip)
  120.  
  121.  
  122.           The low clip percentage is set equal to _l_o_w_C_l_i_p and the high clip
  123.           percentage is set equal to _h_i_g_h_C_l_i_p.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))
  137.  
  138.  
  139.  
  140.      sssseeeettttHHHHiiiissssttttLLLLiiiimmmmiiiittttssss(((())))
  141.  
  142.           void ilHistScaleImgSetHistLimits(ilHistScaleImg *img, double Clip,
  143.                                            double high)
  144.  
  145.  
  146.           This function sets the limits between which the histogram is
  147.           computed; that is, the histogram is computed between pixel
  148.           intensities _l_o_w and _h_i_g_h for all channels. This histogram, together
  149.           with the clip percentages, determine the thresholds in each channel.
  150.  
  151.      ggggeeeettttIIIImmmmggggSSSSttttaaaatttt(((())))
  152.  
  153.           ilImgStat*  ilHistScaleImgGetImgStat(ilHistScaleImg *obj)
  154.  
  155.  
  156.           Returns the current value of the input histogram (see below.)
  157.  
  158.      sssseeeettttIIIImmmmggggSSSSttttaaaatttt(((())))
  159.  
  160.           void ilHistScaleImgSetImgStat(ilHistScaleImg *img, ilImgStat *imgstat)
  161.  
  162.  
  163.           The required input histogram is set equal to that pointed to by
  164.           _i_m_g_s_t_a_t.
  165.  
  166.      ggggeeeettttRRRRooooiiii(((())))
  167.  
  168.           ilRoi*  ilHistScaleImgGetRoi(ilHistScaleImg *obj)
  169.  
  170.  
  171.           Returns the current value of the region of interest (see below.)
  172.  
  173.      sssseeeettttRRRRooooiiii(((())))
  174.  
  175.           void ilHistScaleImgSetRoi(ilHistScaleImg *img, ilRoi *roi, int roiXoffset,
  176.                                     int roiYoffset)
  177.  
  178.  
  179.           The desired region of interest is set equal to that pointed to by
  180.           _r_o_i.  _r_o_i_X_o_f_f_s_e_t, _r_o_i_Y_o_f_f_s_e_t specify the _x and _y offsets into the
  181.           source image at which _r_o_i is to be placed. These offsets are
  182.           specified in the same coordinate space as that of the source image.
  183.  
  184. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  185.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllSSSSccccaaaalllleeeeIIIImmmmgggg
  186.      ilScaleImgGetDomain(), ilScaleImgGetIntercept(), ilScaleImgGetRange(),
  187.      ilScaleImgGetSlope(), ilScaleImgResetDomain(), ilScaleImgResetRange(),
  188.      ilScaleImgResetScaling(), ilScaleImgSetDomain(), ilScaleImgSetRange(),
  189.      ilScaleImgSetScaling()
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))
  203.  
  204.  
  205.  
  206.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllMMMMoooonnnnaaaaddddiiiiccccIIIImmmmgggg
  207.      ilMondadicImgGetOffset(), ilMondadicImgSetOffset()
  208.  
  209.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllOOOOppppIIIImmmmgggg
  210.      ilOpImgClearClamp(), ilOpImgGetBias(), ilOpImgGetClamp(),
  211.      ilOpImgGetValidOrders(), ilOpImgGetValidTypes(), ilOpImgIsClamped(),
  212.      ilOpImgIsPrecisionKept(), ilOpImgKeepPrecision(), ilOpImgSetBias(),
  213.      ilOpImgSetClampMinMax(), ilOpImgSetClamp()
  214.  
  215.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg
  216.      ilMemCacheImgEnableMP(), ilMemCacheImgGetPageTime(),
  217.      ilMemCacheImgGetRetainMode(), ilMemCacheImgGetThrashMode(),
  218.      ilMemCacheImgGetThrashTime(), ilMemCacheImgGetTotalPageTime(),
  219.      ilMemCacheImgIsMPenabled(), ilMemCacheImgSetRetainMode(),
  220.      ilMemCacheImgSetThrashMode()
  221.  
  222.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg
  223.      ilCacheImgFlush(), ilCacheImgGetCacheSize()
  224.  
  225.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIImmmmaaaaggggeeee
  226.      ilAddInput(), ilAllocFillData(), ilClipTile(), ilClipTileAsTile(),
  227.      ilClipTileFloat(), ilClipTileFloatAsTile(),
  228.      ilConfigureRetainedCacheImage(), ilCopy(), ilCopyTile(), ilCopyTile3D(),
  229.      ilCopyTileCfg(), ilFillTile(), ilFillTile3D(), ilFillTileRGB(),
  230.      ilFreeFillData(), ilGetColorImg(), ilGetColorModel(), ilGetColormap(),
  231.      ilGetColormapPtr(), ilGetCompression(), ilGetConfig(), ilGetCsize(),
  232.      ilGetDataType(), ilGetDimensions(), ilGetDirectInput(),
  233.      ilGetDisplayCacheEnable(), ilGetFill(), ilGetFillData(),
  234.      ilGetFillValue(), ilGetHeight(), ilGetHwEnable(), ilGetHwHint(),
  235.      ilGetHwHintName(), ilGetHwIntHint(), ilGetHwIntHintName(), ilGetInput(),
  236.      ilGetInputTileRequirement(), ilGetLockTileSet(), ilGetMappedPageSize(),
  237.      ilGetMappedSize(), ilGetMaxColormapLevels(), ilGetMaxValue(),
  238.      ilGetMinValue(), ilGetNumChans(), ilGetNumInputs(), ilGetOrder(),
  239.      ilGetOrientation(), ilGetPageBorder(), ilGetPageBorderPtr(),
  240.      ilGetPageBorderX(), ilGetPageBorderY(), ilGetPageBorderZ(),
  241.      ilGetPageCounts(), ilGetPageDelta(), ilGetPageDeltaStruct(),
  242.      ilGetPageDimensions(), ilGetPageIndices(), ilGetPageOrigin(),
  243.      ilGetPageOriginC(), ilGetPageOriginStruct(), ilGetPageOriginX(),
  244.      ilGetPageOriginY(), ilGetPageOriginZ(), ilGetPageSize(),
  245.      ilGetPageSizeBytes(), ilGetPageSizeC(), ilGetPageSizePix(),
  246.      ilGetPageSizeStruct(), ilGetPageSizeVal(), ilGetPageSizeX(),
  247.      ilGetPageSizeXY(), ilGetPageSizeY(), ilGetPageSizeZ(), ilGetPixel(),
  248.      ilGetPixel3D(), ilGetPriority(), ilGetScaleMax(), ilGetScaleMin(),
  249.      ilGetSize(), ilGetSizePtr(), ilGetStrides(), ilGetSubTile(),
  250.      ilGetSubTile3D(), ilGetTile(), ilGetTile3D(), ilGetWidth(), ilGetXsize(),
  251.      ilGetYsize(), ilGetZsize(), ilHasPageBorder(), ilHasPages(),
  252.      ilInitScaleMinMax(), ilIsColorImg(), ilIsIntegral(),
  253.      ilIsMirrorOrientation(), ilIsSigned(), ilIsWritable(), ilLockPage(),
  254.      ilLockPageSet(), ilLockTile(), ilLockTile3D(), ilMapFlipTrans(),
  255.      ilMapFromInput(), ilMapFromInput2D(), ilMapFromInput3D(),
  256.      ilMapFromSource(), ilMapFromSource2D(), ilMapFromSource3D(),
  257.      ilMapOrientation(), ilMapSize(), ilMapTile(), ilMapTileFlipTrans(),
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHiiiissssttttSSSSccccaaaalllleeeeIIIImmmmgggg((((3333))))
  269.  
  270.  
  271.  
  272.      ilMapTileFloat(), ilMapToInput(), ilMapToInput2D(), ilMapToInput3D(),
  273.      ilMapToSource(), ilMapToSource2D(), ilMapToSource3D(), ilMapXY(),
  274.      ilMapXYFloat(), ilMapXYSign(), ilQCopyTileCfg(), ilQFillTile3D(),
  275.      ilQFillTileRGB(), ilQGetSubTile3D(), ilQGetTile3D(), ilQLockPageSet(),
  276.      ilQSetSubTile3D(), ilQSetTile3D(), ilRemoveHwHint(),
  277.      ilRemoveHwHintName(), ilRemoveInput(), ilSetColorModel(),
  278.      ilSetColormap(), ilSetCompression(), ilSetCsize(), ilSetDataType(),
  279.      ilSetDisplayCacheEnable(), ilSetFill(), ilSetFillValue(),
  280.      ilSetHwEnable(), ilSetHwHint(), ilSetHwIntHint(), ilSetHwIntHintName(),
  281.      ilSetInput(), ilSetMaxColormapLevels(), ilSetMaxValue(), ilSetMinValue(),
  282.      ilSetNumChans(), ilSetOrder(), ilSetOrientation(), ilSetPageBorder(),
  283.      ilSetPageBorderStruct(), ilSetPageSize(), ilSetPageSizeC(),
  284.      ilSetPageSizeStruct(), ilSetPageSizeXY(), ilSetPageSizeZ(), ilSetPixel(),
  285.      ilSetPixel3D(), ilSetPriority(), ilSetScaleMinMax(), ilSetScaleType(),
  286.      ilSetSize(), ilSetSubTile(), ilSetSubTile3D(), ilSetTile(),
  287.      ilSetTile3D(), ilSetXYsize(), ilSetXsize(), ilSetYsize(), ilSetZsize(),
  288.      ilUnlockPage(), ilUnlockPageSet()
  289.  
  290.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllLLLLiiiinnnnkkkk
  291.      ilLinkClearSet(), ilLinkClearStatus(), ilLinkGetDescription(),
  292.      ilLinkGetDirectParent(), ilLinkGetDisabledIndex(), ilLinkGetFloatProp(),
  293.      ilLinkGetGenerationID(), ilLinkGetIntProp(), ilLinkGetNumChildren(),
  294.      ilLinkGetNumParents(), ilLinkGetParent(), ilLinkGetPtrProp(),
  295.      ilLinkGetRelatedChild(), ilLinkGetRelatedDelete(),
  296.      ilLinkGetRelatedType(), ilLinkGetStatus(), ilLinkIsAllowed(),
  297.      ilLinkIsAltered(), ilLinkIsEnabled(), ilLinkIsRelated(), ilLinkIsSet(),
  298.      ilLinkRemoveParent(), ilLinkRemoveProp(), ilLinkSetDescription(),
  299.      ilLinkSetDisabledIndex(), ilLinkSetEnabled(), ilLinkSetParent(),
  300.      ilLinkSetProp(), ilLinkSetRelatedDelete(), ilLinkSetRelatedType()
  301.  
  302. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  303.      ilImgStat, ilMonadicImg, ilRoi, ilScaleImg
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.